{% extends "../theme/bage.html" %}
{% block head %}
<title>{{ _('Add map') }} </title>
<meta name="keywords" content="{{ _('Add map') }} ">
<meta name="description" content="{{ _('Add map') }}">
{% module use_f2e('codemirror') %}
{% end %}
{% block typebody %}
<div class="panel panel-black">
    <div class="panel-heading"><h1 class="htitle">{{ _('Add map') }}</h1></div>
    <div class="panel-body">
        <form method="post" class="form-horizontal" id="form_post" role="form">

                <div class="form-group">
                    <label for="title" class="col-sm-2 control-label">{{ _('Title') }}</label>

                    <div class="col-sm-10">
                        <input type="text" id="title" name="title" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="title" class="col-sm-2 control-label">ID</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_map_uid" name="ext_map_uid" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="tags" class="col-sm-2 control-label">{{ _('label') }}</label>

                    <div class="col-sm-10">
                        <input type="text" id="tags" name="tags" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="ext_lat" class="col-sm-2 control-label">{{ _('lat') }}</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_lat" name="ext_lat" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="ext_lon" class="col-sm-2 control-label">{{ _('lon') }}</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_lon" name="ext_lon" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="ext_zoom_max" class="col-sm-2 control-label">{{ _('zoom_max') }}</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_zoom_max" name="ext_zoom_max" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="ext_zoom_min" class="col-sm-2 control-label">{{ _('zoom_min') }}</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_zoom_min" name="ext_zoom_min" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="ext_zoom_current" class="col-sm-2 control-label">{{ _('zoom_current') }}</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_zoom_current" name="ext_zoom_current" class="form-control">
                    </div>
                </div>
                {% for ii in range(0,5) %}
                <div class="form-group">
                    {% if ii == 0 %}
                    <label for="pcat0" class="col-sm-2 control-label">{{ _('Category') }}</label>
                    {% else %}
                    <label for="pcatx" class="col-sm-2 control-label"></label>
                    {% end %}
                    <div class="col-sm-3">
                        <select name="pcat{{ii}}" id="pcat{{ii}}" class="form-control"
                                onchange="g_load_infocat({{ii}})">
                            <option>{{ _('Please select') }}</option>
                            {% for taginfo in tag_infos %}
                            {% if taginfo.uid.endswith('00') %}
                            <option value="{{ taginfo.uid }}">{{ taginfo.name }}
                            </option>
                            {% else %}
                            {% end %}
                            {% end %}
                        </select>
                    </div>
                    <div class="col-sm-4">
                        <select name="gcat{{ii}}" id="gcat{{ii}}" class="form-control">
                        </select>
                    </div>
                </div>
                {% end %}
                 <div class="form-group">
                    <label class="col-sm-2 control-label" for="logo">{{ _('logo') }}</label>

                    <div class="col-sm-10">


                        <input type="text" id="logo" name="logo" class="form-control" readonly/>

                        <br>

                        <a class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal" title="Upload picture">
                            {{ _('Upload picture') }}
                        </a>


                    </div>
                </div>
                <div class="form-group">
                    <label for="cnt_md" class="col-sm-2 control-label">{{ _('Content') }}</label>

                    <div class="col-sm-10">
                        <textarea rows=16 id="cnt_md" name="cnt_md" cols="70" class="form-control"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="memo">{{ _('Memo') }} </label>

                    <div class="col-sm-10">
                        <textarea class="form-control" rows=10 id="memo" name="memo"></textarea>

                    </div>
                </div>
                <div class="form-group">
                    <label for="sub1" class="col-sm-2 control-label"></label>

                    <div class="col-sm-10">
                        <input id="sub1" type="submit" value="{{ _('Submit') }}" class="btn btn-primary">
                    </div>
                </div>

        </form>
         {% module upload_pic() %}
    </div>
</div>

{% end %}


